import java.io.File;
import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:打印当前目录下的所有文件
 * Author: WJW
 * Date: 2024-08-20
 * Time: 11:57
 */
public class IODemo4 {
    public static void main(String[] args) {
        File file = new File(".");
        //String[] files = file.list();
        File[] files = file.listFiles();//打印结果是一个个file对象
        System.out.println(Arrays.toString(files));
    }
}
